package com.vehicle.mapper;

import com.vehicle.pojo.Rentals;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface RentalsMapper {

    /**
     * 统计ID的数量
     * @param id
     * @return
     */
    @Select("select count(customer_id) from rentals where customer_id =#{id}")
    Long selctCustomerIdSumById(long id);

    /**
     * 根据Id查询车辆租赁及归还时间车辆id
     * @param id
     * @return
     */
    List<Rentals> selectById(Long id);
}
